-module(open_code_block).
-include_lib("nitrogen/include/wf.inc").
-compile(export_all).
%This module is invisible until shown... usually used with handle_code_block

						%Builders
assemble_header(X) ->
    X.

assemble_menu(X) ->
    X.

assemble_body(X) ->
    LightboxBody = [
		    #rounded_panel{color=gray,
				   body = ["Test"]},
		    #br{},
		    #button{id=ocb_openbox_hide, text="Close"}
			    
		   ],
    Body = [
	    #lightbox{ id=ocb_openbox, 
			body=[ #rounded_panel{id=ocb_openbox_content, color=white, body=LightboxBody} ]}
	    ],

    case hglobals:vget(helper:id_me(), connected) of
	true ->
	    X ++ Body;
	_ ->
	    X
    end.
						%Wiring

wire() ->
    wf:wire(ocb_openbox, #hide{}),
    wf:wire(ocb_openbox_content, #event{target=ocb_openbox, actions=#hide{}}),
    ok.
						%Behavior
behave() ->
    ok.
						%Events
event(_) ->
    ok.
